#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>

int main()
{
    //模拟僵尸进程
    //while :; do ps axj | head -1 && ps ajx | grep state | grep -v grep; sleep 1; done用来检测state进程的状态
    pid_t id = fork();
    
    if(id > 0)
    {
        printf("parent\n");
        sleep(30);
    }
    else 
    {
        printf("child\n");
        sleep(5);
        exit(1);
    }
    return 0;
}
